import React, {Component} from 'react'
import { Input, Button, Icon, Table } from 'antd'

const Search =　Input.Search

class NewClassRecord extends Component {
  constructor() {
    super()
    this.state = {

    }
  }

  render() {
    const columns = [{
      title: '订单号',
      key: 'orderNum',
      dataIndex: 'orderNum',
    }, {
      title: '时间',
      dataIndex: 'time',
    }, {
      title: '班级',
      dataIndex: 'class',
    }, {
      title: '状态',
      dataIndex: 'status',
      render: text => {
        return <span className="rt-color-yellow">{text}</span>
      }
    },{
      title: '操作',
      dataIndex: 'uilty',
      render: (text, record, index) => {
        return (
          <div className="rt-operation">
            <Button
              icon="edit"
              onClick={
                () => {
                  this.setStuVisible(true)
                }
              }
            >
              编辑
            </Button>
            <Button icon="exception">订单</Button>
            <Icon type="delete" className="rt-color-red"/>
          </div>
        )
      }
    }]
    const data = [];
    for (let i = 0; i < 20; i++) {
      data.push({
        key: i,
        orderNum: 123456,
        time: '135****8888',
        class: 'London, Park Lane no',
        status: i,
      })
    }
    return (
        <div className="rt-stu-order">
          <div className="cl rt-order-out">
            <Search className="rt-intent-seach lf" placeholder="输入关键字" onSearch={(value) => {console.log(value)}} />
            <Button className="rt-btn-search">搜索</Button>
            <Button
              className="rt-btn-orange rf"
              icon="addfile"
            >
              新建记录
            </Button>
          </div>
          <Table className="rt-itent-table rt-order-table" columns={columns} dataSource={data} />
        </div>
      )
  }
}

export default NewClassRecord